package com.ihr360.oneclick.request;

import org.springframework.data.domain.Sort;

import java.util.List;

/**
 * 列表数据查询请求数据模型
 *
 * @author tom
 * @date 17-12-19
 */
public class SearchRequest<T> {

    private int page = 0;

    private int rows = 10;

    /**
     * 排序字段
     */
    private String sortField;

    private List<Sort.Order> orderList;

    /**
     * 排序方向
     */
    private Sort.Direction sortDirection = Sort.Direction.ASC;

    private T queryParam;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public String getSortField() {
        return sortField;
    }

    public void setSortField(String sortField) {
        this.sortField = sortField;
    }

    public Sort.Direction getSortDirection() {
        return sortDirection;
    }

    public void setSortDirection(Sort.Direction sortDirection) {
        this.sortDirection = sortDirection;
    }

    public T getQueryParam() {
        return queryParam;
    }

    public void setQueryParam(T queryParam) {
        this.queryParam = queryParam;
    }

    public List<Sort.Order> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<Sort.Order> orderList) {
        this.orderList = orderList;
    }
}
